﻿using AutoMapper;
using ERP.Domain.Scheduling;
using Scheduling.Api.Write.Application.Command.CalendarCommand;
using Scheduling.Api.Write.Application.Command.TeamCommand;
using Scheduling.Api.Write.Application.Command.TeamMemberCommand;
using Scheduling.Api.Write.Application.Command.TeamTypeCommand;
using Scheduling.Api.Write.Application.Command.ShiftCommand;
using Scheduling.Api.Write.Application.Command.ScheduleCommand;

namespace Scheduling.Api.Write
{
    public class AutoMapperFile:Profile
    {
        public AutoMapperFile() 
        {
            CreateMap<Team, TeamAddCommand>().ReverseMap();//班组添加

            CreateMap<Team, TeamUpdCommand>().ReverseMap();//班组修改

            CreateMap<TeamType, TeamTypeAddCommand>().ReverseMap();//班组类型添加

            CreateMap<TeamType, TeamTypeUpdCommand>().ReverseMap();//班组修改

            CreateMap<TeamMember, TeamMemberAddCommand>().ReverseMap();//班组修改
            CreateMap<TeamMember, TeamMemberUpdCommand>().ReverseMap();
            CreateMap<TeamMember, TeamMemberDelCommand>().ReverseMap();

            // Calendar 映射
            CreateMap<Calendar, CalendarAddCommand>().ReverseMap();
            CreateMap<Calendar, CalendarUpdCommand>().ReverseMap();

            // Shift 映射
            CreateMap<Shift, IShiftAddCommand>().ReverseMap();
            CreateMap<Shift, IShiftUpdCommand>().ReverseMap();

            // Schedule 映射
            CreateMap<Schedule, ScheduleAddCommand>().ReverseMap();
            CreateMap<Schedule, ScheduleUpdCommand>().ReverseMap();

        }
    }
}
